<clr-modal [(clrModalOpen)]="modalOpened"  [clrModalSize]="'lg'" #modal>
    <h3 class="modal-title">{{title}}
      <wayne-modal-operate [modal]="modal" *ngIf="modalOpened"></wayne-modal-operate>
    </h3>
  <div class="modal-body">
    <form #ngForm="ngForm">
      <section class="form-block">
        <div class="form-group" style="padding-left: 135px;">
          <label for="pvc_id" class="col-md-3 form-group-label-override required">PVC</label>
          <div class="select form-control">
            <select id="pvc_id"
                    [(ngModel)]="pvcTpl.persistentVolumeClaimId"
                    [disabled]="actionType==1" name="pvc_id">
              <!--这是一个坑，如果使用value获取到的是string，使用ngValue获取到的是model本身类型-->
              <option *ngFor="let pvc of pvcs"
                      [ngValue]="pvc.id"
                      [selected]="pvc.id == pvcTpl.persistentVolumeClaimId">{{pvc.name}}
              </option>
            </select>
          </div>
        </div>
        <div class="form-group" style="padding-left: 135px;">
          <label for="description" class="col-md-3 form-group-label-override">描述</label>
          <textarea id="description" [(ngModel)]="pvcTpl.description"
                    name="description"
                    rows="3">
          </textarea>
        </div>
        <div class="form-group" style="padding-left: 135px;">
          <label for="template" class="col-md-3 form-group-label-override">模版</label>
          <wayne-ace-editor-box></wayne-ace-editor-box>
        </div>

      </section>
    </form>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-outline" (click)="onCancel()">取消</button>
    <button type="button" class="btn btn-primary" [disabled]="!isValid" (click)="onSubmit()">提交</button>
  </div>
</clr-modal>
